#ifndef AREA_H_
#define AREA_H_

#include "physics/path.h"

// forward declaration
class Path;

/**
* The sides of collisions
**/
enum Side
{
	SIDE_NONE = 0,
	SIDE_LEFT = 1,
	SIDE_RIGHT = 2,
	SIDE_TOP = 4,
	SIDE_BOTTOM = 8
};

/**
* An area that handles the collision of other areas.
* 
* @author dfoelber
**/
class Area
{
public:
	enum Id
	{
		NONE = 0,
		RECTANGLE
	};
	
public:
	// Constructor
	Area( Id id, Path* path ) { this->path = path; this->id = id; }
	
	// Destructor
	virtual ~Area() {}
	
	// Gets the Id.
	Id GetId() { return id; }
	
	// If this area intersects another area.
	virtual int Intersects( Area* area, double sourceX, double sourceY, double otherX, double otherY ) { return SIDE_NONE; }
	
	Path* GetPath() { return path; }
	
	virtual double GetX() { return 0.0; }
	virtual double GetY() { return 0.0; }
	virtual double GetWidth() { return 0.0; }
	virtual double GetHeight() { return 0.0; }
	
private:
	// The area's ID
	Id				id;
	// The area's path
	Path*			path;
};

#endif /*AREA_H_*/
